{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "4b39394d-1d6f-4e07-a41c-9ecde55b1cc4",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "aaaaa\n"
     ]
    }
   ],
   "source": [
    "x = \"a\"\n",
    "x = x * 5\n",
    "print(x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "4502ecd0-5aad-4849-8705-82dbb4890359",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hello\n",
      "hello\n",
      "hello\n",
      "hello\n"
     ]
    },
    {
     "ename": "KeyboardInterrupt",
     "evalue": "",
     "output_type": "error",
     "traceback": [
      "\u001b[31m---------------------------------------------------------------------------\u001b[39m",
      "\u001b[31mKeyboardInterrupt\u001b[39m                         Traceback (most recent call last)",
      "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[2]\u001b[39m\u001b[32m, line 5\u001b[39m\n\u001b[32m      3\u001b[39m \u001b[38;5;28;01mwhile\u001b[39;00m \u001b[38;5;28;01mTrue\u001b[39;00m:\n\u001b[32m      4\u001b[39m     \u001b[38;5;28mprint\u001b[39m(\u001b[33m'\u001b[39m\u001b[33mhello\u001b[39m\u001b[33m'\u001b[39m)\n\u001b[32m----> \u001b[39m\u001b[32m5\u001b[39m     \u001b[43mtime\u001b[49m\u001b[43m.\u001b[49m\u001b[43msleep\u001b[49m\u001b[43m(\u001b[49m\u001b[32;43m3\u001b[39;49m\u001b[43m)\u001b[49m    \n",
      "\u001b[31mKeyboardInterrupt\u001b[39m: "
     ]
    }
   ],
   "source": [
    "import time\n",
    "\n",
    "while True:\n",
    "    print('hello')\n",
    "    time.sleep(3)    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "b09834d5-d912-4dd9-aa2d-f1025fc9b30e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "9\n"
     ]
    }
   ],
   "source": [
    "x = 5\n",
    "print(x + 4)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "29887121-cfe0-421c-8694-76de7d880381",
   "metadata": {},
   "source": [
    "# 标题示例\n",
    "\n",
    "## 二级标题\n",
    "### 三级标题\n",
    "\n",
    "---\n",
    "\n",
    "**加粗文本** 和 *斜体文本* 或 ~~删除线~~\n",
    "\n",
    "> 引用文本：Markdown 让写作更简单\n",
    "\n",
    "---\n",
    "\n",
    "## 列表示例\n",
    "\n",
    "### 无序列表\n",
    "- 项目一\n",
    "- 项目二\n",
    "  - 子项目\n",
    "  - 子项目\n",
    "\n",
    "### 有序列表\n",
    "1. 第一步\n",
    "2. 第二步\n",
    "3. 第三步\n",
    "\n",
    "---\n",
    "\n",
    "## 链接和图片\n",
    "\n",
    "[百度链接](https://www.baidu.com)\n",
    "\n",
    "---\n",
    "\n",
    "## 代码\n",
    "\n",
    "行内代码：`print(\"Hello World\")`\n",
    "\n",
    "代码块：\n",
    "\n",
    "```python\n",
    "def hello():\n",
    "    print(\"Hello Markdown!\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "b5dbd558-176a-440d-9034-fc8d1b0a5e7c",
   "metadata": {},
   "source": [
    "<h1>欢迎来到我的网页</h1>\n",
    "\n",
    "<!-- 导航菜单 -->\n",
    "<nav>\n",
    "    <ul>\n",
    "        <li><a href=\"#home\">首页</a></li>\n",
    "        <li><a href=\"#about\">关于</a></li>\n",
    "        <li><a href=\"#contact\">联系方式</a></li>\n",
    "    </ul>\n",
    "</nav>\n",
    "\n",
    "<!-- 主要内容区 -->\n",
    "<main>\n",
    "    <section id=\"home\">\n",
    "        <h2>主页内容</h2>\n",
    "        <p>这是一个简单的HTML文档示例，不包含任何CSS样式。</p>\n",
    "        <p>HTML定义了网页的结构和内容。</p>\n",
    "  \n",
    "<!-- 页脚 -->\n",
    "<footer>\n",
    "    <p>&copy; 2023 我的网站. 保留所有权利.</p>\n",
    "    <address>\n",
    "        联系方式: <a href=\"mailto:contact@example.com\">contact@example.com</a>\n",
    "    </address>\n",
    "</footer>"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "9d79b7f9-e05b-4f35-95a3-da5002db5916",
   "metadata": {},
   "source": [
    "# LaTeX 数学公式示例\n",
    "\n",
    "## 行内公式\n",
    "在文本中嵌入公式，例如欧拉公式：$e^{i\\pi} + 1 = 0$ 或者质能方程 $E = mc^2$。\n",
    "\n",
    "## 独立公式块\n",
    "常用数学公式：\n",
    "\n",
    "### 二次方程求根公式\n",
    "$$\n",
    "x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}\n",
    "$$\n",
    "\n",
    "### 积分示例\n",
    "$$\n",
    "\\int_{-\\infty}^{\\infty} e^{-x^2} dx = \\sqrt{\\pi}\n",
    "$$\n",
    "\n",
    "### 矩阵运算\n",
    "$$\n",
    "\\begin{bmatrix}\n",
    "a & b \\\\\n",
    "c & d \\\\\n",
    "\\end{bmatrix}\n",
    "\\times\n",
    "\\begin{bmatrix}\n",
    "x \\\\\n",
    "y \\\\\n",
    "\\end{bmatrix}\n",
    "= \n",
    "\\begin{bmatrix}\n",
    "ax + by \\\\\n",
    "cx + dy \\\\\n",
    "\\end{bmatrix}\n",
    "$$\n",
    "\n",
    "### 求和与极限\n",
    "$$\n",
    "\\sum_{n=1}^{\\infty} \\frac{1}{n^2} = \\frac{\\pi^2}{6}\n",
    "$$\n",
    "\n",
    "$$\n",
    "\\lim_{x \\to 0} \\frac{\\sin x}{x} = 1\n",
    "$$\n",
    "\n",
    "### 分段函数\n",
    "$$\n",
    "f(x) = \n",
    "\\begin{cases}\n",
    "x^2 & \\text{当 } x \\geq 0 \\\\\n",
    "-x & \\text{当 } x < 0\n",
    "\\end{cases}\n",
    "$$\n",
    "\n",
    "### 希腊字母和运算符\n",
    "$\\alpha, \\beta, \\gamma, \\Gamma, \\nabla, \\partial$\n",
    "\n",
    "### 集合论\n",
    "$$\n",
    "A \\cup B = \\{ x \\mid x \\in A \\lor x \\in B \\}\n",
    "$$\n",
    "\n",
    "### 概率论\n",
    "$$\n",
    "P(A|B) = \\frac{P(B|A)P(A)}{P(B)}\n",
    "$$\n",
    "\n",
    "## 对齐的多行公式\n",
    "$$\n",
    "\\begin{aligned}\n",
    "(a + b)^2 &= a^2 + 2ab + b^2 \\\\\n",
    "(a - b)^2 &= a^2 - 2ab + b^2 \\\\\n",
    "a^2 - b^2 &= (a + b)(a - b)\n",
    "\\end{aligned}\n",
    "$$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "7d475e44-31ac-4261-bf15-9b11d7e71188",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
